package com.zbkj.common.response.project;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Auther:
 * @Date: 2024/7/10 11:04
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ReportInfoResponse对象", description = "项目估算结果信息响应对象")
public class ReportInfoResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("项目ID")
    @NotNull(message = "缺少项目ID参数")
    private Long projectId;

    @ApiModelProperty("项目名称")
    private String projectName;

    @ApiModelProperty("项目预算金额")
    private BigDecimal budgetAmount;

    @ApiModelProperty("是否通知客户端：0 未通知 1、已通知")
    private Integer estimateFlag;

    @ApiModelProperty("项目提交时间")
    private Date createTime;

    @ApiModelProperty("完成时间")
    private Date endTime;

    @ApiModelProperty("上报信息填写内容-未填写时返回null")
    private InfoResponse infoResponse;

    @ApiModelProperty("上报信息填写项-集合")
    private List<ItemResponse> itemList;

    @ApiModelProperty("编辑-查询估算总结-功能明细文件对象")
    private InformationResponse informationResponse;

    @Getter
    @Setter
    @ApiModel(value = "InfoResponse对象", description = "上报信息填写内容响应对象")
    public static class InfoResponse implements Serializable {
        private static final long serialVersionUID = 1L;

        @ApiModelProperty("软件估算价值(下限)")
        private BigDecimal estimCostMin;

        @ApiModelProperty("软件估算价值(中值)")
        private BigDecimal estimCostMid;

        @ApiModelProperty("软件估算价值(上限)")
        private BigDecimal estimCostMax;

        /*@ApiModelProperty("成本金额")
        private BigDecimal costAmount;

        @ApiModelProperty("利润率单位%")
        private BigDecimal profitRate;

        @ApiModelProperty("税率单位%")
        private BigDecimal taxRate;*/

        @ApiModelProperty("调整后规模(功能点)合计")
        private BigDecimal totalFactor;
    }

    @Getter
    @Setter
    @ApiModel(value = "ItemResponse对象", description = "上报信息填写项响应对象")
    public static class ItemResponse implements Serializable {
        private static final long serialVersionUID = 1L;

        @ApiModelProperty("软件预估边界")
        @NotBlank(message = "软件预估边界不能为空")
        private String bounds;

        @ApiModelProperty("规模估算结果(功能点)")
        private BigDecimal funPoints;

        @ApiModelProperty("规模变更调整因子取值")
        private BigDecimal reuseFactor;

        @ApiModelProperty("调整后工作量(下限)")
        private BigDecimal valf1;

        @ApiModelProperty("调整后工作量(中值)")
        private BigDecimal valf2;

        @ApiModelProperty("调整后工作量(上限)")
        private BigDecimal valf3;

       /* @ApiModelProperty("计算机资源限制F4")
        @NotNull(message = "计算机资源限制F4不能为空")
        private BigDecimal valf4;

        @ApiModelProperty("赋值处理F5")
        @NotNull(message = "赋值处理F5不能为空")
        private BigDecimal valf5;

        @ApiModelProperty("可重用性F6")
        @NotNull(message = "可重用性F6不能为空")
        private BigDecimal valf6;

        @ApiModelProperty("多环境F7")
        @NotNull(message = "多环境F7不能为空")
        private BigDecimal valf7;*/

        @ApiModelProperty("调整后规模(功能点)")
        private BigDecimal adjustFactor;

        /*@ApiModelProperty("软件功能规模")
        @NotNull(message = "软件功能规模不能为空")
        private BigDecimal softwareFun;*/

        @ApiModelProperty("前端上传顺序")
        private Integer sortNum;

    }
}
